import QtQuick 2.2
import "../images"

Rectangle{
    id: menu
    property bool isSelect: false
    property string picpath: "../images/menu0.png"
    signal choose(bool select, int flag)
    signal hidemenuflag()
    width: 50; height: 16
   // border.width: 2; border.color: qsTr("green")


    function changePic()
    {
        if(isSelect)
        {
            isSelect =false;
            picpath = "../images/menu0.png"
        }
        else
        {
            isSelect = true;
            picpath = "../images/menu1.png"
        }
    }

    MouseArea{
        anchors.fill: parent
        onClicked:
        {

            parent.changePic()
            console.log(qsTr("header_menu is over!"))
            menu.choose(isSelect, 0)

        }
    }

    Image {
        id: picture
        source: picpath
        anchors.fill: parent
    }



}
